<?php
session_start(); 
/*................................................................ 
 .  [E路联盟系统]                                          .
 .  版本: 2006A1.0                                                  . 
 .  原作: isrn (isrn@qq.com)                             .
 .  支持: http://www.16lm.com        .
................................................................*/
error_reporting(7);
require_once '../../includes/global.php';
require_once '../../includes/function/infofunction.php';
$wcfg=Dga('wcfg',"web like '".$sitename."' and lg like '".$_SESSION[LG]."'");
$wcfg=json_decode($wcfg[wcfg],true);

$webconfig[lgconfig]=$wcfg['lang'];
//print_r($_GET[lg]);

$lglist=Bcc('lg[]',array_keys($wcfg['lang']),$wcfg['lang'],$_GET['lg']);
$ttt->assign('lglist',$lglist);


$sinfo=Dga('infosort',"id='".$_GET[sortid]."'");
//单个删除
function delOne($gid){
	$delOne = new xajaxResponse();
	$arr['del']=1;
	Du('price',$arr,'gid',$gid);
	//$delOne->alert('删除成功');
	$delOne->addAppend('body','innerHTML','<div style="position:absolute;top:0;left:50%;color:#549B49;font-size:17px;">恭喜您,删除成功...</div>');
	$delOne->addScript('setTimeout("location.reload()",800);');
	return $delOne;
}
//批量删除
function delAll($gid){
	$delAll = new xajaxResponse();
	$arr['del']=1;
	//$delAll->alert('删除成功');
	//$delAll->alert($gid[2]);
	foreach ($gid as $k=>$v){
		Du('price',$arr,'gid',$v);
		//$delAll->alert($v);
	}

	$delAll->addAppend('body','innerHTML','<div style="position:absolute;top:0;left:50%;color:#549B49;font-size:17px;">恭喜您,删除成功...</div>');
	$delAll->addScript('setTimeout("location.reload()",800);');

	return $delAll;
}
//bic
//for($i=0;$i<100;$i++) {
//Jc(Bic());
//}
$priceInfo=Dga('infosort',"del!=1 and id='".$_GET['bdsortid']."'");
//配置搜索		
		//$condition.=" and userid = '".$_."'(prodtype,".$_GET[sortid]."')>0";
		$condition.=" and bdb='".$priceInfo['tname']."' and bdgid='".$_GET['bdid']."'";
		$sql="SELECT count(id) as num
		FROM lm_price
		where 1  and del!=1 ".$condition;
		$res=mysql_query($sql);
		$temp=mysql_fetch_array($res);
		//每页
		$pageline=10;
		!$_GET['seachpage']&&$_GET['seachpage']=1;
		$ajaxpage=new lm_page(array('total'=>$temp[num],'perpage'=>$pageline,'page_name'=>'seachpage'));
		mysql_free_result($res);
		
		//分页输出 
		Tr($ajaxpage->show(1),'nav');

$content=Dgs('price',"del!=1 ".$condition." order by date desc   LIMIT ".($_GET['seachpage']-1)*$pageline." , ".$pageline." ");



$fangxing=Dga($priceInfo['tname'],"del!=1 and gid='".$_GET['bdid']."'");
Tr($fangxing,'fangxing');
Tr($content,'content');

$xajax = new xajax(); 
//$xajax->bDecodeUTF8Input=true;
//$xajax->debugOn();

$xajax->registerFunction("delOne");
$xajax->registerFunction("delAll");
$xajax->processRequests();
Tr($xajax->getJavascript('/includes/class/xajax/'),'PrintXajax');
Ts("info/infolistbic.htm");


?>
